package cn.xyf.mzmy.server.dal.mysql.user;

import cn.xyf.mzmy.server.dal.dataobject.user.User;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xyf
 * @since 2025-07-23
 */
public interface UserMapper extends BaseMapper<User> {

    // 编码规范：尽量把MybatisPlus的操作逻辑写在Mapper里
    default User selectById(Long id){
        return selectOne(new LambdaQueryWrapper<User>().eq(User::getId,id));
    }
}
